package com.example.myhuangye.DS;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.myhuangye.R;

public class MainDS1ctivity extends AppCompatActivity implements View.OnClickListener{
    private Button DSID1;
    private Button btn_call41;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_ds1ctivity);
        DSID1 = (Button) findViewById(R.id.DSID1);
        DSID1.setOnClickListener(this);

        btn_call41 = (Button) findViewById(R.id.btn_call41);
        btn_call41.setOnClickListener(this);

        findViewById(R.id.HT41).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }//回退//

    public void onClick(View view) {//点击事件//
        switch (view.getId()){
            case R.id.DSID1:
                Uri uri = Uri.parse("https://www.jd.com");
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);

                break;
            case R.id.btn_call41:
                Intent intent1=  new Intent(Intent.ACTION_DIAL);
                intent1.setData(Uri.parse("tel:4006065500"));
                startActivity(intent1);
                break;

        }


    }




}
